package com.wander.business.book.c2_2_4.config;

import com.wander.business.book.c2_2_4.entity.DemoBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @author Wander.Zeng
 * @create 2017-10-15 16:02
 * @desc BookConfig_c2_2_4
 */
@Configuration
@ComponentScan("com.wander.business.book.c2_2_4")
public class BookConfig_c2_2_4 {

    @Bean
    @Profile("dev")
    public DemoBean devDemoBean() {
        return new DemoBean("from development profile");
    }

    @Bean
    @Profile("prod")
    public DemoBean ProdDemoBean() {
        return new DemoBean("from production profile");
    }

}
